package com.education.welco.enums;

public enum StudentStateEnums {

    STU_STATE_ZERO("0", "待审核"),
    STU_STATE_ONE("1", "已审核"),
    STU_STATE_TWO("2", "已驳回");

    private String type;
    private String desc;

    StudentStateEnums(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    // 普通方法  传入type,获取描述
    public static String getDesc(String type) {
        for (StudentStateEnums c : StudentStateEnums.values()) {
            if (c.getType().equals(type)) {
                return c.getDesc();
            }
        }
        return "待审核";
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
